import {createRouter, createWebHashHistory} from "vue-router";

const routes = [
    {
        path: '',
        component: () => import('../components/NavigationBar.vue'),
        children:[
            {
                path: '/home',
                name: 'home',
                component: () => import('../components/home/allHome.vue'),
            },
            {
                path: '/contest',
                name: 'contest',
                component: () => import('../components/contest/allContest.vue'),
            },
            {
                path: '/rate',
                name: 'rate',
                component: () => import('../components/rate/allRate.vue'),
            }
        ]
    }
]

const router = createRouter({
    history : createWebHashHistory(),
    routes //简写 原为 routes  : routes
})

export default router